package com.example.demo.behavior.mediator;

/**
 * @Desc:
 * @Author zzz
 * @Date 2021/2/24
 * @Version V1.0
 */
public class MediatorTest {
    public static void main(String[] args) {
        LianJia lianJia = new LianJia();
        Customer buyer = new Buyer("张三");
        Customer seller = new Seller("李四");
        lianJia.register(buyer);
        lianJia.register(seller);

        lianJia.relay(buyer, "有两室一厅的房子吗");
        lianJia.relay(seller, "有，XX小区靠近地铁8000块");
        lianJia.relay(buyer, "太贵了，打扰了");
    }
}
